﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Factory
{
    public partial class TrocarCheque : Form
    {
        public TrocarCheque()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {

        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void grpCheques_Enter(object sender, EventArgs e)
        {

        }

        private void rdbDinheiro_CheckedChanged(object sender, EventArgs e)
        {
            campos();
        }

        private void TrocarCheque_Load(object sender, EventArgs e)
        {
            rdbDinheiro.Checked = true;
        }

        private void rdbCheque_CheckedChanged(object sender, EventArgs e)
        {
            campos();
        }

        private void campos()
        {
            if (rdbDinheiro.Checked == true)
            {
                btnAdicionar.Visible = false;
                txtDataSerasa.Enabled = false;
                txtCpfCheque.Enabled = false;
                txtCpfCliente.Enabled = false;
                cboBanco.Enabled = false;
                txtValor.Enabled = true;
                txtComp.Enabled = false;
            }
            if (rdbCheque.Checked == true)
            {
                btnAdicionar.Visible = true;
                txtComp.Enabled = true;
                txtCpfCheque.Enabled = true;
                txtCpfCliente.Enabled = false;
                txtDataSerasa.Enabled = true;
                txtValor.Enabled = true;
                cboBanco.Enabled = true;
            }   
        }

        private void grpNovoCheque_Enter(object sender, EventArgs e)
        {

        }
    }
}
